/**
 * Copyright [2019] [LiBo/Alex of copyright liboware@gmail.com ]
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.dess.task.config;

import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;

/**
 * @project-name:dess
 * @package-name:com.hyts.dess.task.config
 * @author:LiBo/Alex
 * @create-date:2020-09-09 16:13
 * @copyright:libo-alex4java
 * @email:liboware@gmail.com
 * @description:
 */
public class CompetableFutureHolder {

    /**
     * 执行操作处理功能实现方法
     * @param suppliers
     * @param <T>
     * @return
     */
//    public static <T> T doExecute(Supplier<T>... suppliers){
//        if(suppliers == null){
//            return null;
//        }else if(suppliers.length == 1){
//            return suppliers[0].get();
//        }else{
//            CompletableFuture completableFuture = CompletableFuture.supplyAsync(suppliers[0]);
//            for (int i=1 ; i<suppliers.length; i++){
//                completableFuture.thenApply(param->param+"");
//            }
//        }
//    }
}
